<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>完成付款 - 安阳师范网购系统！</title>
<link type="text/css" href="<%=basePath%>/mallstyle/css/header.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/main.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/footer.css"
	rel="stylesheet" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/qq.css"
	rel="stylesheet" />
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/index.js"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/jquery.js" charset="utf-8"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/cart.js"
	charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/main.js"
	charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/qq.js"
	charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/kissy.js"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/switchable-pkg.js"></script>
<!--[if lte IE 6]>
<script type="text/javascript" language="Javascript" src="http://www.999000.cn/themes/mall/default/styles/default/<%=basePath%>/mallstyle/js/hoverForIE6.js"></script>
<![endif]-->

<script type="text/javascript">
//<!CDATA[
var SITE_URL = "http://www.999000.cn";
var REAL_SITE_URL = "http://www.999000.cn";
var PRICE_FORMAT = '¥%s';
//]]>
</script>


<!--<editmode></editmode>-->

<script>
      var _hmt = _hmt || [];
      (function() {
         var hm = document.createElement("script");
         hm.src = "//hm.baidu.com/hm.js?dcaa35200cee94d622f4315114994082";
         var s = document.getElementsByTagName("script")[0];
         s.parentNode.insertBefore(hm, s);
      })();
   </script>

</head>
<body>
     <%@include file="../../../nav.jsp"%>
     <%@include file="../../../header.jsp"%>
	<style type="text/css">
.mall-nav {
	display: none
}
</style>
<style type="text/css">
.cashier-bank {
	margin-left: 50px;
	display: none;
}

.cashier-bank ul li {
	width: 170px;
	height: 60px;
	float: left;
}

.icon-box {
	width: 123px;
	height: 40px;
	border: 1px solid #ddd;
	display: inline-block;
}

.cashier-bank .icon {
	background-image: url(/images/bankicon.png);
	width: 120px;
	height: 40px;
	display: inline-block;
	vertical-align: middle;
}

.ABC {
	background-position: 0 -480px;
}

.CCB {
	background-position: 0 -320px;
}

.CEB {
	background-position: 0 -440px;
}

.COMM {
	background-position: 0 -600px;
}

.GDB {
	background-position: 0 -280px;
}

.GDBB2B, .GDBB2B000 {
	background-position: 0 -661px;
}

.CITIC {
	background-position: 0 -200px;
}

.SDB {
	background-position: 0 -240px;
}

.SPDB {
	background-position: 0 -360px;
}

.ICBC {
	background-position: 0 -40px;
}

.CMB {
	background-position: 0 -80px;
}

.CIB {
	background-position: 0 -3365px;
}

.PSBC {
	background-position: 0 -400px;
}

.VISA, .VISA000, .VISACC, .VISAB2C, .VISAKT, .VISAMB2C {
	background-position: 0 -696px;
}

.abc1001, .abc1003 {
	background-position: 0 -720px;
}

.abc1002, .abc1004 {
	background-position: 0 -3079px;
}

.ICBCPer, .ICBCPerKT, .ICBCPerB2C {
	background-position: 0 -40px;
}

.ABCPer, .ABCPer {
	background-position: 0 -480px;
}

.BOC, .BOCSH, .BOCCCL {
	background-position: 0 -520px;
}

.BJRCB {
	background-position: 0 -2640px;
}
-->
</style>
	<script>
function checkneed_pay()
{
	if (parseFloat($("#need_pay_money").html())==0)
	{
		$('#need_pay_password').css("display","block");
		$("#pay_info_other").css("height","120px");
		$('#Paylist').css("display","none");
	}
	else
	{
		$('#Paylist').css("display","block");
	}
}
$(function(){

$('#account_first').click(function()
{
	if ($(this).attr("checked")==false)
	{
		$('#money_can_use').attr("checked",false);
		$('#need_pay_password').css("display","none");
		$("#pay_info_other").css("height","80px");
		$.getJSON("index.php?app=cashier&act=change_type&order_id=154820&account_first=0", function(data){
		  $("#need_pay_money").html(data.retval.pay_money_real);
		  $("#need_send_money").html(data.retval.sendMoney);
		  $("#need_send_voucher").html(data.retval.sendVoucher);
		  $("#order_money_pay").html(data.retval.money_pay);
		  checkneed_pay();
		});
	}
	else
	{
		  $("#need_pay_money").html("799");
		  $("#need_send_money").html("711.1");
		  $("#need_send_voucher").html("0");
		  $("#order_money_pay").html("0");
		   checkneed_pay();
	}
});
$('#money_can_use').click(function()
{
	if ($(this).attr("checked"))
	{
		$('#account_first').attr("checked",true);
		$.getJSON("index.php?app=cashier&act=change_type&order_id=154820&money_can_use=1", function(data){
		  $("#need_pay_money").html(data.retval.pay_money_real);
		  $("#need_send_money").html(data.retval.sendMoney);
		  $("#need_send_voucher").html(data.retval.sendVoucher);
		  $("#order_money_pay").html(data.retval.money_pay);
		  checkneed_pay();
		});	
	}
	else
	{
		  $('#account_first').attr("checked",true);
		  $("#need_pay_money").html("799");
		  $("#need_send_money").html("711.1");
		  $("#need_send_voucher").html("0");
		  $("#order_money_pay").html("0");
		   checkneed_pay();
	}	
});


$('#payment_alibank').click(function(){
	if ($(this).attr('checked')==true)
	{
	$('.cashier-bank').css('display','block');
	alert('请选择下面银行列表中的一家!');
	}
	else
	{
	$('.cashier-bank').css('display','none');
	}
});

});

function goto_pay()
{
	if ($('#payment_alibank').attr('checked')==true)
	{
		 	var val=$('.cashier-bank input:radio[name="channelToken"]:checked').val();
			if(val==null){
				alert("请选择一个银行!");
				return false;
			}
	}
	return true;
}
</script>
	<div id="main" class="w-full">
		<div id="page-cashier" class="w">
			<div class="step step3 mt10 clearfix">
				<span class="fs14 strong f60">1.查看购物车</span> 
				<span class="fs14 strong f60">2.确认订单信息</span> 
				<span class="fs14 strong fff">3.付款</span> 
				<span class="fs14 strong">4.确认收货</span>
				<span class="fs14 strong">5.评价</span>
			</div>
			<div class="order-form cashier clearfix">
				<form action="index.php?app=cashier&act=goto_pay&order_id=154820"
					method="POST" id="goto_pay">
					<div class="order_info border mt20 clearfix">
						<div class="ico"></div>
						<div class="text">
							<p class="fs14 strong">
								订单提交成功！ 订单总价 <span class="f60">${sum }</span> 元  <font color=red
									style="font-weight: normal;"></font>
							</p>
							<p>* 您的订单已成功生成，选择您想用的支付方式进行支付</p>
							<p>
								* <a href="index.php?app=buyer_order" target="_blank">您可以在用户中心中的我的订单查看该订单</a>
							</p>
						</div>
					</div>

					<div class="buy border padding10 mt10" id="Paylist">
						<h3>
							<b class="ico">选择支付方式并付款</b> <b
								style="font-size: 18px; color: red;">支付 <span
								id="need_pay_money">${sum }</span> 元现金
							</b> (交易成功后将另赠送 <span id="need_send_money">711.1</span>代金券 <span
								id="need_send_voucher"> 0</span>购物券至会员帐户)
						</h3>
						<dl class="defray">
							<dt>在线支付</dt>
							<dd class="mb10 clearfix">
								<p class="radio float-left">
									<input id="payment_alipay" type="radio" name="payment_id"
										value="4" />
								</p>
								<p class="logo float-left">
									<label for="payment_alipay"><img
										src="#"
										alt="支付宝-宁夏久零网络科技有限公司" title="支付宝-宁夏久零网络科技有限公司" width="125"
										height="47" /></label>
								</p>
								<p class="explain float-left">宁夏久零网络科技有限公司</p>

							</dd>
							<dd class="mb10 clearfix">
								<p class="radio float-left">
									<input id="payment_alibank" type="radio" name="payment_id"
										value="5" />
								</p>
								<p class="logo float-left">
									<label for="payment_alibank"><img
										src="#"
										alt="网银支付-网上银行，在线支付。你只需开通以下其中一家网上银行，便可进行交易。"
										title="网银支付-网上银行，在线支付。你只需开通以下其中一家网上银行，便可进行交易。" width="125"
										height="47" /></label>
								</p>
								<p class="explain float-left">网上银行，在线支付。你只需开通以下其中一家网上银行，便可进行交易。</p>

								<p style="clear: both;" id="bank_list">
									<div class="cashier-bank">
										<ul class="ui-list-icons fn-clear">
											<li><input name="channelToken" type="radio" id="icbc"
												value="ICBCB2C" /> <label class="icon-box" for="icbc">
													<span class="icon ICBC" title="中国工商银行"></span>
											</label></li>

											<li><input type="radio" name="channelToken" id="ccb"
												value="CCB" /> <label class="icon-box" for="ccb"> <span
													class="icon CCB" title="中国建设银行"> </span>
											</label></li>

											<li><input type="radio" name="channelToken" id="abc"
												value="ABC" /> <label class="icon-box" for="abc"> <span
													class="icon ABC" title="中国农业银行"> </span>
											</label></li>

											<li><input type="radio" name="channelToken" id="cmb"
												value="CMB" /> <label class="icon-box" for="cmb"> <span
													class="icon CMB" title="招商银行"> </span>
											</label></li>

											<li><input type="radio" name="channelToken" id="boc"
												value="BOCB2C" /> <label class="icon-box" for="boc">
													<span class="icon BOC" title="中国银行"> </span>
											</label></li>

											<li><input type="radio" name="channelToken" id="comm"
												value="COMM" /> <label class="icon-box" for="comm">
													<span class="icon COMM" title="交通银行"> </span>
											</label></li>

											<li><input type="radio" name="channelToken" id="spdb"
												value="SPDB" /> <label class="icon-box" for="spdb">
													<span class="icon SPDB" title="上海浦东发展银行"> </span>
											</label></li>

											<li><input type="radio" name="channelToken" id="cib"
												value="CIB" /> <label class="icon-box" for="cib"> <span
													class="icon CIB" title="兴业银行"> </span>
											</label></li>
										</ul>
									</div>
								</p>
							</dd>
							<dd class="mb10 clearfix">
								<p class="radio float-left">
									<input id="payment_wxpay" type="radio" name="payment_id"
										value="7" />
								</p>
								<p class="logo float-left">
									<label for="payment_wxpay"><img
										src="#"
										alt="微信支付-使用微信扫描二维码后利用微支付完成交易"
										title="微信支付-使用微信扫描二维码后利用微支付完成交易" width="125" height="47" /></label>
								</p>
								<p class="explain float-left">使用微信扫描二维码后利用微支付完成交易</p>

							</dd>
						</dl>
					</div>
					<div class="make_sure mt10 mb20">
						<p>
							<a href="<%=path%>/rest/orderform/confirmpay"
								class="btn-step fff strong fs14">确认支付</a>
						</p>
					</div>
				</form>
			</div>
		</div>
	</div>
	<div class="clear"></div>
<%@include file="../../../bottom.jsp" %>
</body>
</html>
